<div id="background">
  <form class="layui-form" *ngIf="food">
    <div class="layui-form-item">
      <div class="layui-form-inline">
        <label class="layui-form-label">食物编号: {{food.id}}</label>
        <div class="layui-input-inline">
        </div>
      </div>
      <div class="layui-form-item">
        <div class="layui-form-inline">
          <label class="layui-form-label">食物名称</label>
          <div class="layui-input-inline">
            <input type="text" name="name" required lay-verify="required" placeholder="请输入食物名称" autocomplete="off" class="layui-input"
              [(ngModel)]="food.name">
          </div>
        </div>
      </div>
    </div>

    <div class="layui-form-item">
      <div class="layui-form-inline">
        <label class="layui-form-label">食物价格</label>
        <div class="layui-input-inline">
          <input type="text" name="price" required lay-verify="required" placeholder="请输入食物价格" autocomplete="off" class="layui-input"
            [(ngModel)]="food.price">
        </div>
      </div>
    </div>

    <div class="layui-form-item">
      <div class="layui-form-inline">
        <label class="layui-form-label">描述信息</label>
        <div class="layui-input-block">
          <textarea name="desc" placeholder="请输入内容" class="layui-textarea" [(ngModel)]="food.desc"></textarea>
        </div>
      </div>
    </div>
    <div class="layui-form-item">
      <div class="layui-input-block">
        <button class="layui-btn" lay-submit lay-filter="formDemo" (click)="updateFood(food)">确定修改</button>
        <button type="reset" class="layui-btn layui-btn-primary" (click)="reset()">重置</button>
      </div>
    </div>
  </form>
</div>